using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class Disabler : MonoBehaviour {
	
	public List<MonoBehaviour> deactivationList = new List<MonoBehaviour>();

	void invert(){
		foreach(MonoBehaviour m in deactivationList){
			if(m.enabled){
				m.enabled = false;
			}else{
				m.enabled = true;
			}
		}
	}
	
	public void enable(){
		foreach(MonoBehaviour m in deactivationList){
			m.enabled = true;
		}
	}
	
	public void disable(){
		foreach(MonoBehaviour m in deactivationList){
			m.enabled = false;
		}
	}
	
	public void addToList(MonoBehaviour m){
		deactivationList.Add(m);
	}
	
	public void removeFromList(MonoBehaviour m){
		deactivationList.Remove(m);
	}
	void Start(){
	}
}
